﻿using Entity.Enums;
using Entity.Models.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
using System.Text;

namespace Entity.Models.dto
{

    /// <summary>
    /// 工作流实例DTO
    /// </summary>
    public class WorkFlow_InstanceDTO
    {
        /// <summary>
        /// Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 工作流模板名称
        /// </summary>
        public string _modelName { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public string _status { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string _description { get; set; }

        /// <summary>
        /// 申请理由
        /// </summary>
        public string _reason { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime _createTime { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        public string _createTimes { get; set; }

        /// <summary>
        /// 添加人Id
        /// </summary>
        public string _creatorName { get; set; }
        /// <summary>
        /// 出库数量
        /// </summary>
        public int _outNum { get; set; }
        /// <summary>
        /// 出库物资Id
        /// </summary>
        public string _outGoodsName { get; set; }

        public WorkFlow_InstanceDTO(WorkFlow_InstanceDTO workFlow_Instance)
        {
            
            Id = workFlow_Instance.Id;
            _modelName = workFlow_Instance._modelName;
            _status = workFlow_Instance._status;
            _description = workFlow_Instance._description;
            _reason = workFlow_Instance._reason;
            _createTimes = workFlow_Instance._createTime.ToString("yyyy-MM-dd HH:mm:ss");
            _creatorName = workFlow_Instance._creatorName;
            _outNum = workFlow_Instance._outNum;
            _outGoodsName = workFlow_Instance._outGoodsName;
        }
        public WorkFlow_InstanceDTO(WorkFlow_Instance workFlow_Instance)
        {
            _modelName = workFlow_Instance.ModelId;
            _description = workFlow_Instance.Description;
            _reason = workFlow_Instance.Reason;
            _createTimes = workFlow_Instance.CreateTime.ToString("yyyy-MM-dd HH:mm:ss");
            _creatorName = workFlow_Instance.Creator;
            _outNum = workFlow_Instance.OutNum;
            _outGoodsName = workFlow_Instance.OutGoodsId;
        }
        public WorkFlow_InstanceDTO()
        {
        }
    }
}
